package com.drinks.yiniang.adapter.shop;

import android.content.Context;
import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseViewHolder;
import com.drinks.yiniang.R;
import com.drinks.yiniang.adapter.base.BaseQuickRCVAdapter;
import com.drinks.yiniang.entity.shop.MfrsDetailJson;
import com.drinks.yiniang.utils.GlideUtils;
import com.hansen.library.ui.widget.image.CircleImageView;

import java.util.List;

/**
 * 厂商专家列表adapter
 * @author han
 * @date 2019/8/30
 */
public class MfrsExpertAdapter extends BaseQuickRCVAdapter<MfrsDetailJson.MfrsDetailUser, BaseViewHolder> {

    public MfrsExpertAdapter(Context mContext, @Nullable List<MfrsDetailJson.MfrsDetailUser> data) {
        super(R.layout.item_mfrs_expert, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MfrsDetailJson.MfrsDetailUser item) {
        GlideUtils.loadAvatar(mContext, (CircleImageView) helper.getView(R.id.iv_mfrs_expert_avatar), item.getAvatar());
        helper.setText(R.id.tv_mfrs_expert_name, item.getUsername());
    }
}
